﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 继承与多态_接口interface案例
{
    internal class Driver
    {
        private IRunnable runnable = null;
        public Driver() { }
        public Driver(IRunnable runnable) 
        { 
            this.runnable = runnable;
        }
        public void Drive()
        {
            runnable.Run();
        }
    }
}
